package com.hertz.alarm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hertz.alarm.entity.MatchNba;
import com.hertz.alarm.entity.Team;
import com.hertz.alarm.service.EntityService;
import com.hertz.alarm.service.TeamNbaService;
import com.hertz.alarm.util.ConstantsType;
@Service
public class TeamNbaServiceImpl extends BaseServiceImpl implements TeamNbaService {
	@Resource
	private EntityService entityService;
	
	@Override
	public Team getTeam(Short id) {
		return entityService.getById(id, Team.class);
	}

	@Override
	public List<Team> findAll() {
		return baseDAO.listAll(Team.GET_ALL_TEAM_TYPE_LEAGUE, ConstantsType.TEAM_TYPE.BASKETBALL.getCode(),ConstantsType.TEAM_LEAGUE.NBA.getCode());
	}

	@Override
	public Team getTeamBySourceId(String sourceId) {
		// TODO Auto-generated method stub
		return baseDAO.getUniqueResult(Team.GET_TEAM_BY_SOURCE_ID, sourceId,ConstantsType.TEAM_TYPE.BASKETBALL.getCode(),ConstantsType.TEAM_LEAGUE.NBA.getCode());
	}
	
}
